package com.xiechuang.api;

import com.xiechuang.component.HystrixError;
import com.xiechuang.config.FeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Description api
 * @Author xiechuang
 * @Date 2021/11/14
 */
@FeignClient(name = "eureka-client01-demo", configuration = FeignConfig.class, fallback = HystrixError.class)
public interface TestApi {

    /**
     * 测试feign
     *
     * @param name
     * @return
     */
    @RequestMapping(value = "/testFeign", method = RequestMethod.GET)
    String testFeign(@RequestParam(value = "name") String name);

}
